from fastapi import FastAPI
from contextlib import asynccontextmanager

from app.models import create_db_and_tables


@asynccontextmanager
async def fast_api_lifespan(app: FastAPI):
    create_db_and_tables()
    yield
